package com.framework.util;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;

import com.framework.entity.ConsoleuserFormMap;


public class MapToDataMap {
	
	
	
	/**
	 * map to ConsoleuserFormMap
	 *	@author 李品良
	 * @param map
	 * @return 
	 * @return
	 */
	public <T> T mapToDataMap(Map<String, Object> map) {
		ConsoleuserFormMap datacenterFormMap=new ConsoleuserFormMap();
		Set<String> set=map.keySet();
		Iterator<String> iterator= set.iterator();
		while (iterator.hasNext()) {
			String key = (String) iterator.next();
			String value=map.get(key).toString();
			datacenterFormMap.put(key, value);
		}
		
		return (T) datacenterFormMap;
		
	}
}
